package com.springboot.java.design.builder;

/**
 * @Author: TongRui乀
 * @Date: 2019-12-11 13:34
 * @description：
 */
public class HeroDirector {

    private HeroBuilder builder;

    public HeroDirector(HeroBuilder builder){
        this.builder = builder;
    }

    public HeroDirector(){}

    public HeroBuilder getBuilder() {
        return builder;
    }

    public void setBuilder(HeroBuilder builder) {
        this.builder = builder;
    }

    public Hero build(){

        this.builder.name();

        this.builder.skin();

        this.builder.sex();

        this.builder.desc();

        return this.builder.build();
    }
}
